Skip to content

Remove unused bridge-based RCTTurboModuleManager initializer (#57065)#57065

Closed
christophpurrer wants to merge 1 commit into
react:mainfrom
christophpurrer:export-D107409088
Closed

Remove unused bridge-based RCTTurboModuleManager initializer (#57065)#57065
christophpurrer wants to merge 1 commit into
react:mainfrom
christophpurrer:export-D107409088

Conversation

@christophpurrer

@christophpurrer christophpurrer commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary:

Changelog:

[iOS][Breaking] Remove unused bridge-based RCTTurboModuleManager initializer

RCTTurboModuleManager declared three initializers, but only the bridgeless (RCTBridgeProxy-based) ones are used. The bridge-based initWithBridge:delegate:jsInvoker: initializer was the only path that ever set a non-nil bridge, leaving a large amount of bridge-only code permanently dead under the surviving initializers.

This removes that initializer along with the now-dead bridge-mode code: the _bridge ivar, the decorateNativeMethodCallInvoker: decoration, the RCTModuleData/registerModuleForFrameUpdates: registration, the performanceLogger setup markers, and the bridge invalidation notification observers and handlers. initWithBridgeProxy:bridgeModuleDecorator:delegate:jsInvoker:devMenuConfigurationDecorator: becomes the designated initializer, and the shorter RCTBridgeProxy initializer now forwards to it. The RCTDidInitializeModuleNotification post is preserved with a nil bridge, matching the existing runtime behaviour of the bridgeless initializers.

Differential Revision: D107409088

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 3, 2026
@meta-codesync

meta-codesync Bot commented Jun 3, 2026

Copy link
Copy Markdown

@christophpurrer has exported this pull request. If you are a Meta employee, you can view the originating Diff in D107409088.

@facebook-github-tools facebook-github-tools Bot added p: Facebook Partner: Facebook Partner labels Jun 3, 2026
@meta-codesync meta-codesync Bot changed the title Remove unused bridge-based RCTTurboModuleManager initializer Remove unused bridge-based RCTTurboModuleManager initializer (#57065) Jun 3, 2026
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Jun 3, 2026
…7065)

Summary:

## Changelog:
[iOS][Breaking] Remove unused bridge-based RCTTurboModuleManager initializer

`RCTTurboModuleManager` declared three initializers, but only the bridgeless (`RCTBridgeProxy`-based) ones are used. The bridge-based `initWithBridge:delegate:jsInvoker:` initializer was the only path that ever set a non-nil bridge, leaving a large amount of bridge-only code permanently dead under the surviving initializers.

This removes that initializer along with the now-dead bridge-mode code: the `_bridge` ivar, the `decorateNativeMethodCallInvoker:` decoration, the `RCTModuleData`/`registerModuleForFrameUpdates:` registration, the `performanceLogger` setup markers, and the bridge invalidation notification observers and handlers. `initWithBridgeProxy:bridgeModuleDecorator:delegate:jsInvoker:devMenuConfigurationDecorator:` becomes the designated initializer, and the shorter `RCTBridgeProxy` initializer now forwards to it. The `RCTDidInitializeModuleNotification` post is preserved with a nil bridge, matching the existing runtime behaviour of the bridgeless initializers.

Differential Revision: D107409088
…7065)

Summary:

## Changelog:
[iOS][Breaking] Remove unused bridge-based RCTTurboModuleManager initializer

`RCTTurboModuleManager` declared three initializers, but only the bridgeless (`RCTBridgeProxy`-based) ones are used. The bridge-based `initWithBridge:delegate:jsInvoker:` initializer was the only path that ever set a non-nil bridge, leaving a large amount of bridge-only code permanently dead under the surviving initializers.

This removes that initializer along with the now-dead bridge-mode code: the `_bridge` ivar, the `decorateNativeMethodCallInvoker:` decoration, the `RCTModuleData`/`registerModuleForFrameUpdates:` registration, the `performanceLogger` setup markers, and the bridge invalidation notification observers and handlers. `initWithBridgeProxy:bridgeModuleDecorator:delegate:jsInvoker:devMenuConfigurationDecorator:` becomes the designated initializer, and the shorter `RCTBridgeProxy` initializer now forwards to it. The `RCTDidInitializeModuleNotification` post is preserved with a nil bridge, matching the existing runtime behaviour of the bridgeless initializers.

Differential Revision: D107409088
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Jun 3, 2026
…7065)

Summary:

## Changelog:
[iOS][Breaking] Remove unused bridge-based RCTTurboModuleManager initializer

`RCTTurboModuleManager` declared three initializers, but only the bridgeless (`RCTBridgeProxy`-based) ones are used. The bridge-based `initWithBridge:delegate:jsInvoker:` initializer was the only path that ever set a non-nil bridge, leaving a large amount of bridge-only code permanently dead under the surviving initializers.

This removes that initializer along with the now-dead bridge-mode code: the `_bridge` ivar, the `decorateNativeMethodCallInvoker:` decoration, the `RCTModuleData`/`registerModuleForFrameUpdates:` registration, the `performanceLogger` setup markers, and the bridge invalidation notification observers and handlers. `initWithBridgeProxy:bridgeModuleDecorator:delegate:jsInvoker:devMenuConfigurationDecorator:` becomes the designated initializer, and the shorter `RCTBridgeProxy` initializer now forwards to it. The `RCTDidInitializeModuleNotification` post is preserved with a nil bridge, matching the existing runtime behaviour of the bridgeless initializers.

Reviewed By: philIip

Differential Revision: D107409088
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Jun 3, 2026
…7065)

Summary:

## Changelog:
[iOS][Breaking] Remove unused bridge-based RCTTurboModuleManager initializer

`RCTTurboModuleManager` declared three initializers, but only the bridgeless (`RCTBridgeProxy`-based) ones are used. The bridge-based `initWithBridge:delegate:jsInvoker:` initializer was the only path that ever set a non-nil bridge, leaving a large amount of bridge-only code permanently dead under the surviving initializers.

This removes that initializer along with the now-dead bridge-mode code: the `_bridge` ivar, the `decorateNativeMethodCallInvoker:` decoration, the `RCTModuleData`/`registerModuleForFrameUpdates:` registration, the `performanceLogger` setup markers, and the bridge invalidation notification observers and handlers. `initWithBridgeProxy:bridgeModuleDecorator:delegate:jsInvoker:devMenuConfigurationDecorator:` becomes the designated initializer, and the shorter `RCTBridgeProxy` initializer now forwards to it. The `RCTDidInitializeModuleNotification` post is preserved with a nil bridge, matching the existing runtime behaviour of the bridgeless initializers.

Reviewed By: philIip

Differential Revision: D107409088
@meta-codesync meta-codesync Bot closed this in cb74b82 Jun 3, 2026
@facebook-github-tools facebook-github-tools Bot added the Merged This PR has been merged. label Jun 3, 2026
@meta-codesync

meta-codesync Bot commented Jun 3, 2026

Copy link
Copy Markdown

This pull request has been merged in cb74b82.

@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @christophpurrer in cb74b82

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants